using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._IntelligenceTools._Analysis._Suitability
{
    /// <summary>
    /// <para>Least Cost Path</para>
    /// <para>Finds the shortest path between starting points and ending points across a cost surface.</para>
    /// <para>查找成本图面上起点和终点之间的最短路径。</para>
    /// </summary>    
    [DisplayName("Least Cost Path")]
    public class LeastCostPath : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public LeastCostPath()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_cost_surface">
        /// <para>Input Cost Surface</para>
        /// <para>The input raster used to determine the cost to travel from starting point to ending point. No Data values cannot be crossed.</para>
        /// <para>用于确定从起点到终点的行驶成本的输入栅格。无 不能跨越数据值。</para>
        /// </param>
        /// <param name="_in_start_point">
        /// <para>Input Starting Point</para>
        /// <para>The input starting point feature. Multiple start points will significantly increase processing time.</para>
        /// <para>输入起点要素。多个起点将显著增加处理时间。</para>
        /// </param>
        /// <param name="_in_end_point">
        /// <para>Input Ending Point</para>
        /// <para>The input ending point feature. Multiple end points will increase the number of output lines, as the resulting path will branch into separate paths.</para>
        /// <para>输入终点特征。多个端点将增加输出行的数量，因为生成的路径将分支为单独的路径。</para>
        /// </param>
        /// <param name="_out_path_feature_class">
        /// <para>Output Path Feature Class</para>
        /// <para>The output path feature class.</para>
        /// <para>输出路径要素类。</para>
        /// </param>
        public LeastCostPath(object _in_cost_surface, object _in_start_point, object _in_end_point, object _out_path_feature_class)
        {
            this._in_cost_surface = _in_cost_surface;
            this._in_start_point = _in_start_point;
            this._in_end_point = _in_end_point;
            this._out_path_feature_class = _out_path_feature_class;
        }
        public override string ToolboxName => "Intelligence Tools";

        public override string ToolName => "Least Cost Path";

        public override string CallName => "intelligence.LeastCostPath";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_cost_surface, _in_start_point, _in_end_point, _out_path_feature_class, _handle_zeros.GetGPValue(), _out_start_point, _out_end_point];

        /// <summary>
        /// <para>Input Cost Surface</para>
        /// <para>The input raster used to determine the cost to travel from starting point to ending point. No Data values cannot be crossed.</para>
        /// <para>用于确定从起点到终点的行驶成本的输入栅格。无 不能跨越数据值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Cost Surface")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_cost_surface { get; set; }


        /// <summary>
        /// <para>Input Starting Point</para>
        /// <para>The input starting point feature. Multiple start points will significantly increase processing time.</para>
        /// <para>输入起点要素。多个起点将显著增加处理时间。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Starting Point")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_start_point { get; set; }


        /// <summary>
        /// <para>Input Ending Point</para>
        /// <para>The input ending point feature. Multiple end points will increase the number of output lines, as the resulting path will branch into separate paths.</para>
        /// <para>输入终点特征。多个端点将增加输出行的数量，因为生成的路径将分支为单独的路径。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Ending Point")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_end_point { get; set; }


        /// <summary>
        /// <para>Output Path Feature Class</para>
        /// <para>The output path feature class.</para>
        /// <para>输出路径要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Path Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_path_feature_class { get; set; }


        /// <summary>
        /// <para>Zero Cost Handled As</para>
        /// <para><xdoc>
        ///   <para>Specifies how zero values in the Input Cost Surface parameter will be handled.</para>
        ///   <bulletList>
        ///     <bullet_item>Small positive—All zeros will be changed to a small positive value. This will allow the cells to be traversed. This is the default.</bullet_item><para/>
        ///     <bullet_item>No data—All zeros will be changed to null values. The cells will not be traversed and will be avoided.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何处理输入成本表面参数中的零值。</para>
        ///   <bulletList>
        ///     <bullet_item>小正值—所有零将更改为小正值。这将允许遍历单元格。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>无数据 - 所有零将更改为空值。单元格不会被遍历，并且将被避免。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Zero Cost Handled As")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _handle_zeros_value _handle_zeros { get; set; } = _handle_zeros_value._SMALL_POSITIVE;

        public enum _handle_zeros_value
        {
            /// <summary>
            /// <para>Small positive</para>
            /// <para>Small positive—All zeros will be changed to a small positive value. This will allow the cells to be traversed. This is the default.</para>
            /// <para>小正值—所有零将更改为小正值。这将允许遍历单元格。这是默认设置。</para>
            /// </summary>
            [Description("Small positive")]
            [GPEnumValue("SMALL_POSITIVE")]
            _SMALL_POSITIVE,

            /// <summary>
            /// <para>No data</para>
            /// <para>No data—All zeros will be changed to null values. The cells will not be traversed and will be avoided.</para>
            /// <para>无数据 - 所有零将更改为空值。单元格不会被遍历，并且将被避免。</para>
            /// </summary>
            [Description("No data")]
            [GPEnumValue("NO_DATA")]
            _NO_DATA,

        }

        /// <summary>
        /// <para>Output Start Point</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Start Point")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_start_point { get; set; }


        /// <summary>
        /// <para>Output End Point</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output End Point")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_end_point { get; set; }


        public LeastCostPath SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}